angular.module('mamApp', ["ui.router", "ui.bootstrap", "ui.select", "ngSanitize", "ngLocale", 's.pagination', 'angularFileUpload', 'ngLocale','w5c.validator','ngImgCrop','ui.event','ui.sortable'])
    .config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function ($stateProvider, $urlRouterProvider) {
        $stateProvider.state('login', {
            url: "/login",
            views: {
                "container": {
                    templateUrl: "templates/userCenter/login.html",
                    controller: 'loginController'
                }
            }
        }).state('/user', {
            url: "/user",
            views: {
                "container": {
                    templateUrl:"templates/user.html"
                }
            }
        }).state('main', {
            url: "/main?close",
            views: {
                "container": {
                    templateUrl: "templates/main.html",
                    controller: 'mainController'
                }
            }
        }).state('main.home', {
            url: "/home",
            views: {
                "container": {
                    templateUrl: "templates/home.html",
                    controller: 'homeController'
                }
            }
        }).state('test', {
            url: "/test",
            views: {
                "container": {
                    templateUrl: "templates/test.html",
                    controller: 'testController'
                }
            }
        }).state('main.album', {
            url: "/album?pageNo&pageSize&reviewStatus&key&value&categoryId&channelId&adminId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/album.html",
                    controller: 'albumController'
                }
            }
        }).state('main.album.program', {
            url: "/program?albumId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/programAudit.html",
                    controller: 'programAuditController'
                }
            }
        }).state('main.album.program.edit', {
            url: "/manage?programId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/programManage.html",
                    controller: 'programManageController'
                }
            }
        }).state('main.album.manage', {
            url: "/manage?albumId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/albumManage.html",
                    controller: 'albumManageController'
                }
            }
        }).state('main.programAudit', {
            url: "/programAudit?pageNo&pageSize&reviewStatus&adminId&channelId&key&value",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/programAudit.html",
                    controller: 'programAuditController'
                }
            }
        }).state('main.programAudit.manage', {
            url: "/manage?programId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/programManage.html",
                    controller: 'programManageController'
                }
            }
        }).state('main.firstLevelChannel', {
            url: "/firstLevelChannel?pageNo&pageSize",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/firstLevelChannel.html",
                    controller: 'firstLevelChannelController'
                }
            }
        }).state('main.secondLevelChannel', {
            url: "/secondLevelChannel?pageNo&pageSize&categoryId&channelName",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/secondLevelChannel.html",
                    controller: 'secondLevelChannelController'
                }
            }
        }).state('main.keywordTags', {
            url: "/keywordTags?pageNo&pageSize&keywordName",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/keywordTags.html",
                    controller: 'keywordTagsController'
                }
            }
        }).state('main.anchorTags', {
            url: "/anchorTags?pageNo&pageSize&keywordName",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/anchorTags.html",
                    controller: 'anchorTagsController'
                }
            }
        }).state('main.commonTag', {
            url: "/common-tags?pageNo&pageSize",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/commonTags.html",
                    controller: 'commonTagController'
                }
            }
        }).state('main.commonTag.manage', {
            url: "/manage?dimensionId&commtagName",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/commonTagsManage.html",
                    controller: 'commonTagManageController'
                }
            }
        }).state('main.anchorTags.manage', {
            url: "/manage?dimensionId&anchortagName",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/anchorTagsManage.html",
                    controller: 'anchorTagManageController'
                }
            }
        }) .state('main.specialTags', {
            url: "/special-tags?pageNo&pageSize",

        }).state('main.specialTagsChannel', {
            url: "/special-tags-channel?pageNo&pageSize",

            views: {
                "container": {
                    templateUrl: "templates/contentCenter/specialTagsChannel.html",
                    controller: 'specialTagsChannelController'
                }
            }
        }).state('main.specialTagsChannel.specialTags', {
            url: "/special-tags?channelId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/specialTags.html",
                    controller: 'specialTagsController'
                }
            }
        }).state('main.specialTagsChannel.specialTags.manage', {
            url: "/manage?dimensionId&specialName",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/specialTagsManage.html",
                    controller: 'specialTagsManageController'
                }
            }
        }).state('main.CPExamine', {
            url: "/CPExamine?pageNo&pageSize&reviewStatus&key&value&status&cplevel&coopType&startDay&endDay",
            views: {
                "container": {
                    templateUrl: "templates/CPCenter/CPExamine.html",
                    controller: 'CPExamineController'
                }
            }
        }).state('main.CPExamine.material', {
            url: "/material?cpId&cpProperty",
            views: {
                "container": {
                    templateUrl: "templates/CPCenter/material.html",
                    controller: 'materialController'
                }
            }
        }).state('main.CPExamine.materialAgreement', {
            url: "/materialAgreement",
            views: {
                "container": {
                    templateUrl: "templates/CPCenter/materialAgreement.html"
                }
            }
        }).state('main.contractManagement', {
            url: "/contractManagement?pageNo&pageSize&reviewStatus&keyword&cpProperty&coopType&startDate&endDate&singerDate",
            views: {
                "container": {
                    templateUrl: "templates/contractCenter/contractManagement.html",
                    controller: 'contractManagementController'
                }
            }
        }).state('main.agreement', {
            url: "/agreement?pageNo&pageSize&agreementStatus&reviewStatus&key&value&status&cplevel&coopType&startDay&endDay",
            views: {
                "container": {
                    templateUrl: "templates/contractCenter/agreement.html",
                    controller: 'agreementController'
                }
            }
        }).state('main.agreement.agreementDetail', {
            url: "/agreementDetail?realName",
            views: {
                "container": {
                    templateUrl: "templates/contractCenter/agreementDetail.html",
                    controller: 'agreementDetailController'
                }
            }
        }).state('main.contractManagement.add', {
            url: "/add",
            views: {
                "container": {
                    templateUrl: "templates/contractCenter/addContractManagement.html",
                    controller: 'addContractManagementController'
                }
            }
        }).state('main.contractManagement.edit', {
            url: "/edit?id",
            views: {
                "container": {
                    templateUrl: "templates/contractCenter/editContractManagement.html",
                    controller: 'editContractManagementController'
                }
            }

        }).state('main.modifyPassword', {
            url: "/modifyPassword",
            views: {
                "container": {
                    templateUrl: "templates/systemCenter/modifyPassword.html",
                    controller: 'modifyPasswordController'
                }
            }
        }).state('main.log', {
            url: "/log?pageNo&pageSize&startTime&endTime&category&adminId&categoryId",
            views: {
                "container": {
                    templateUrl: "templates/systemCenter/log.html",
                    controller: 'logController'
                }
            }
        }).state('main.adminUsers', {
            url: "/admin-users?pageNo&pageSize&roleId&departmentId&fullName&secDepartmentId",
            views: {
                "container": {
                    templateUrl: "templates/systemCenter/userList.html",
                    controller: 'adminUserController'
                }
            }

        }).state('main.adminUsers.manage', {
            url: "/manage?adminId",
            views: {
                "container": {
                    templateUrl: "templates/systemCenter/userManage.html",
                    controller: 'adminUserManageController'
                }
            }

        }).state('main.role', {
            url: "/role?pageNo&pageSize",
            views: {
                "container": {
                    templateUrl: "templates/systemCenter/roleList.html",
                    controller: 'roleController'
                }
            }

        }).state('main.role.manage', {
            url: "/manage?roleId",
            views: {
                "container": {
                    templateUrl: "templates/systemCenter/roleManage.html",
                    controller: 'roleManageController'
                }
            }

        }).state('main.notice', {
            url: "/notice?pageNo&pageSize&keyword",
            views: {
                "container": {
                    templateUrl: "templates/noticeCenter/notice.html",
                    controller: 'noticeController'
                }
            }
        }).state('main.notice.create', {
            url: "/create?noticeId",
            views: {
                "container": {
                    templateUrl: "templates/noticeCenter/noticeCreate.html",
                    controller: 'noticeCreateController'
                }
            }
        }).state('main.notice.detail', {
            url: "/detail?noticeId",
            views: {
                "container": {
                    templateUrl: "templates/noticeCenter/noticeDetail.html",
                    controller: 'noticeCreateController'
                }
            }
        }).state('main.message', {
            url: "/message?pageNo&pageSize&keyword",
            views: {
                "container": {
                    templateUrl: "templates/noticeCenter/message.html",
                    controller: 'messageController'
                }
            }
        }).state('main.message.detail', {
            url: "/detail?messageId",
            views: {
                "container": {
                    templateUrl: "templates/noticeCenter/messageDetail.html",
                    controller: 'messageCreateController'
                }
            }
        }).state('main.message.create', {
            url: "/create?messageId",
            views: {
                "container": {
                    templateUrl: "templates/noticeCenter/messageCreate.html",
                    controller: 'messageCreateController'
                }
            }
        }).state('main.transcoding', {
            url: "/transcoding?pageNo&pageSize&convertStatus&key&value&categoryId&channelId&adminId",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/transcoding.html",
                    controller: 'transcodingController'
                }
            }
        }).state('main.transcoding.cover', {
            url: "/cover?albumId&albumName",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/transcodingAlbumCoverDetail.html",
                    controller: 'transcodingAlbumCoverController'
                }
            }
        }).state('main.transcoding.programs', {
            url: "/programs?albumId&albumName",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/transcodingPrograms.html",
                    controller: 'transcodingProgramsController'
                }
            }
        }).state('main.transcoding.programs.detail', {
            url: "/detail?programId&mode",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/transcodingProgramsDetail.html",
                    controller: 'transcodingProgramsDetailController'
                }
            }
        }).state('main.playControl', {
            url: "/play-control?pageNo&pageSize&key&value&playPlan&categoryId&channelId",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/albumPlayControl.html",
                    controller: 'albumPlayControlController'
                }
            }
        }).state('main.playPlan.playChannel', {
            url: "/play-channel",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/playChannel.html",
                    controller: 'playChannelController'
                }
            }
        }).state('main.playPlan', {
            url: "/play-plan?pageNo&pageSize",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/plan.html",
                    controller: 'planController'
                }
            }
        }).state('main.playPlan.playChannel.playChannelDetail', {
            url: "/play-channel-detail?clientType",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/playChannelDetail.html",
                    controller: 'playChannelDetailController'
                }
            }
        }).state('main.playPlan.manage', {
            url: "/play-plan-manage?planId",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/planManage.html",
                    controller: 'planManageController'
                }
            }
        }).state('main.playPlan.albums', {
            url: "/play-plan-albums?planId&key&value",
            views: {
                "container": {
                    templateUrl: "templates/playControlCenter/planAlbums.html",
                    controller: 'planAlbumsController'
                }
            }
        }).state('main.cpOverview', {
            url: "/cp-overview?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/cpOverview.html",
                    controller: 'cpOverviewController'
                }
            }
        }).state('main.cpNewAdded', {
            url: "/cp-new-added?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/cpNewAdded.html",
                    controller: 'cpNewAddedController'
                }
            }
        }).state('main.albumOverview', {
            url: "/album-overview?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/albumOverview.html",
                    controller: 'albumOverviewController'
                }
            }
        }).state('main.programsOverview', {
            url: "/program-overview?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/programsOverview.html",
                    controller: 'programsOverviewController'
                }
            }
        }).state('main.programsNewAdded', {
            url: "/program-new-added?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/programsNewAdded.html",
                    controller: 'programsNewAddedController'
                }
            }
        }).state('main.albumNewAdded', {
            url: "/album-new-added?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/albumNewAdded.html",
                    controller: 'albumNewAddedController'
                }
            }
        }).state('main.CPSettlement', {
            url: "/cp-settlement",
            views: {
                "container": {
                    templateUrl: "templates/build.html",
                    controller: 'homeController'
                }
            }
        }).state('main.allOverview', {
            url: "/all-overview",
            views: {
                "container": {
                    templateUrl: "templates/build.html",
                    controller: 'homeController'
                }
            }
        }).state('main.playOverview', {
            url: "/paly-overview?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/playOverview.html",
                    controller: 'playOverviewController'
                }
            }
        }).state('main.albumPlay', {
            url: "/album-play?pageNo&pageSize&key&value&field&sortType",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/albumPlay.html",
                    controller: 'albumPlayController'
                }
            }
        }).state('main.albumPlay.albumPlayDetail', {
            url: "/album-play-detail?albumId&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/albumPlayDetail.html",
                    controller: 'albumPlayDetailController'
                }
            }
        }).state('main.programPlay', {
            url: "/program-play?pageNo&pageSize&key&value&field&sortType",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/programPlay.html",
                    controller: 'programPlayController'
                }
            }
        }).state('main.programPlay.programPlayDetail', {
            url: "/program-play-detail?programId&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/programPlayDetail.html",
                    controller: 'programPlayDetailController'
                }
            }
        }).state('main.channelPlayOverview', {
            url: "/channel-play-overview?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/channelPlayOverview.html",
                    controller: 'channelPlayOverviewController'
                }
            }
        }).state('main.channelPlayOverview.twoLevelChannelPlayOverview', {
            url: "/two-level-channel-play-overview?categoryId",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/twoLevelChannelPlayOverview.html",
                    controller: 'twoLevelChannelPlayOverviewController'
                }
            }
        }).state('main.channelPlayOverview.twoLevelChannelPlayOverview.twoLevelChannelPlayDetail', {
            url: "/two-level-channel-play-detail?channelId",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/twoLevelChannelPlayDetail.html",
                    controller: 'twoLevelChannelPlayDetailController'
                }
            }
        }).state('main.cpPlayOverview', {
            url: "/cp-play-overview?pageNo&pageSize&key&value",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/cpPlayOverview.html",
                    controller: 'cpPlayOverviewController'
                }
            }
        }).state('main.cpPlayOverview.cpPlayOverviewDetail', {
            url: "/cp-play-overview-detail?cpId&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/cpPlayOverviewDetail.html",
                    controller: 'cpPlayOverviewDetailController'
                }
            }
        }).state('main.appPlayOverview', {
            url: "/app-play-overview?pageNo&pageSize",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/appPlayOverview.html",
                    controller: 'appPlayOverviewController'
                }
            }
        }).state('main.appPlayOverview.appPlayOverviewManage', {
            url: "/app-play-overview-manage?clientType",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/appPlayOverviewManage.html",
                    controller: 'appPlayManagerController'
                }
            }
         }).state('main.appPlayOverview.appPlayOverviewManage.appPlayOverviewDetails', {
            url: "/app-play-overview-details?playChannelId&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/appPlayOverviewDetails.html",
                    controller: 'appPlayDetailsController'
                }
            }
         })      
        //  其他情况跳转
        $urlRouterProvider.otherwise(function ($injector, $location) {
            window.location = "#/login";
        });

    }])

